package net.mikoo.seals.biz.mapper;

import java.util.List;

import org.mybatis.spring.annotation.MapperScan;

import net.mikoo.seals.model.Organization;
import net.mikoo.seals.model.OrganizationParty;
import net.mikoo.seals.model.OrganizationPartyQuery;
import net.mikoo.seals.model.OrganizationQuery;

@MapperScan
public interface OrganizationMapper {
	
	Integer insert(Organization organization);
	
	Integer update(Organization organization);
	
	Organization selectInfoById(Long organizationId);
	
	List<Organization> selectListByQuery(OrganizationQuery query);
	
	Integer deleteByQuery(OrganizationQuery query);

	List<Organization> selectListByParentId(Long parentId);

	Integer deletePartyById(Long organizationId);

	
	/**
	 * 添加员工关联
	 * @param ogrParty
	 * @return
	 */
	Integer insertParty(OrganizationParty ogrParty);

	/**
	 * 删除员工关联
	 * @param orgParty
	 * @return
	 */
	Integer deleteParty(OrganizationParty orgParty);
	Integer deletePartyQuery(OrganizationPartyQuery query);

	Integer countTotal(Long companyId);

	Organization selectInfoByQuery(OrganizationQuery query);

	Organization selectInfoByPartyId(Long partyId);
	Organization selectInfoWithPartyByQuery(OrganizationQuery query);
}